from Library import *

#2HDMC_dir = "/home/yancywww/Softare/bin/HiggsRelated/2HDMC-1.8.0_hbmodified"

parser = argparse.ArgumentParser(description='manual to this script')
parser.add_argument('--totnum', type=int, default = 10000)
parser.add_argument('--param-output-file', type=str, default="../output/1_param.dat")
parser.add_argument('--hbhs-output-file', type=str, default="../output/2_hbhs_output.dat")
args = parser.parse_args()

#setting param region
mAu = 125.0
mAd = 80.0

mhu = 125.0
mhd = 80.0

mH = 125.0

mCu = 120.0
mCd = 95.0

sbau =  0.05
sbad = -0.25

tanbu = 200.0
tanbd = 100.0

m12u  = 500
m12d  = 0

L6 = 0.0
L7 = 0.0

typ = 1

f=open(args.param_output_file,'w')
str_title="mh         mH         mA         mC         sba         tb         L6         L7         m12_2      type      file\n" 
f.write(str_title)

for i in range(0, args.totnum, 1):
######## input parameter 10000 ############
    mA   = random.uniform(0,1)*(mAu-mAd) + mAd
    mh   = random.uniform(0,1)*(mhu-mhd) + mhd
    mC   = random.uniform(0,1)*(mCu-mCd) + mCd
#    sba  = random.uniform(0,1)*(sbau-sbad) + sbad
    sba = 0
    tanb = random.uniform(0,1)*(tanbu-tanbd) + tanbd
#    m12_2 = random.uniform(0,1)*(m12u-m12d) + m12d
    m12_2 = mC*mC*tanb/(1.0+tanb*tanb)

    content="{:.3e}, {:.3e}, {:.3e}, {:.3e}, {:.3e}, {:.3e}, {:.3e}, {:.3e}, {:.3e}, {:.0f},     {file}\n".format(mh, mH, mA, mC, sba, tanb, L6, L7, m12_2, typ, file=args.hbhs_output_file)
    f.write(content)

f.close()
